def main():
    str=input("请输入一串字符串")
    print(enCode(reverse(letter(str))));


def letter(str):
    out=""
    for i in str:
        if i.isalpha():
            out+=i
    return out

def reverse(str):
    out=""
    for i in range(len(str)-1,-1,-1):
        out+=str[i]
    return out

def enCode(s2):
    k = 4
    str_list = s2
    str_list_encry = str_list
    i = 0
    while i < len(str_list):
        if ord(str_list[i]) < 123-k:
            str_list_encry[i] = chr(ord(str_list[i]) + k)
        else:
            str_list_encry[i] = chr(ord(str_list[i]) + k - 26)
        i = i+1
    return str_list_encry

main()
